
//留言内容光标置出事件
function onNameBlur() {
	var contextname = document.getElementById("submitContextName").value;
	if("" == trim(contextname) || 0 == contextname.length || "请输入留言内容..." == contextname) {
		document.getElementById("submitContextName").value = "请输入留言内容...";
		document.getElementById("submitContextName").style.color = "#ACA899";	
		return false;
	}else{
		document.getElementById("submitContextName").style.color = "black";
	}
	return true;
}

//留言内容光标置入事件
function onNameFocus() {
	var contextname = document.getElementById("submitContextName").value;
	if(contextname == "请输入留言内容...") {
		document.getElementById("submitContextName").value = "";	
	}else{
		document.getElementById("submitContextName").style.color = "black";
	}
}

//联系方式光标置出事件
function onCol1Blur() {	
	var username = document.getElementById("col1").value;
	if("" == trim(username) || 0 == username.length || "请输入您的联系方式（电话、手机、QQ或邮箱）" == username) {
		document.getElementById("col1").value = "请输入您的联系方式（电话、手机、QQ或邮箱）";
		document.getElementById("col1").style.color = "#ACA899";	
		return false;
	}else{
		document.getElementById("col1").style.color = "black";
	} 
	return true;
}

//联系方式光标置入事件
function onCol1Focus() {
	var username = document.getElementById("col1").value;
	if(username == "请输入您的联系方式（电话、手机、QQ或邮箱）") {
		document.getElementById("col1").value = "";	
	}else{
		document.getElementById("col1").style.color = "black";
	}
}

//提交问题事件
function onFmSubmit() {
	var state = onNameBlur() && onCol1Blur();	
	return state;
}			
			